//package com.bsoft.ecommerce.sampler;
//
//import brave.sampler.RateLimitingSampler;
//import brave.sampler.Sampler;
//import org.springframework.cloud.sleuth.sampler.ProbabilityBasedSampler;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
///**
// * @program: e-commerce-springclound
// * @description:     使用配置方式设定抽样率
// *
// * @author: hdh
// * @create: 2022:06:24 17:21
// */
//
//@Configuration
//public class SamplerConfig {
//    //限速采集
//    @Bean
//     public Sampler  sampler(){
//
//        return RateLimitingSampler.create(100);
//    }
//    @Bean
//    public Sampler defaultSampler(){
//        return ProbabilityBasedSampler.create(0.5f);
//    }
//}
//
